#pragma once
#include"grid.h"
class Grid;
//grid face
class GridFace
{
public:
	GridFace() {};
	GridFace(const GridFace& face);
	GridFace( Grid* parent, const vector<size_t>& coord_index) :parent_(parent), nodeIndexVec_(coord_index) {};
public:
	void AddNeiborElement(int element_index);
public:
	int GetNodeNum()const { return nodeIndexVec_.size(); }
	const vector<size_t> GetNodeIndexVec()const { return nodeIndexVec_; }
	vector<Point>GetNodeCoord()const;
	vector<size_t>GetElementIndex()const { return neibor_element_index_; }
	bool operator==(const GridFace& face)const;
private:
	// the grid this face belong
	 Grid* parent_;
	// the nodes this face contain
	vector<size_t>nodeIndexVec_;
	// the adjacent elements of this face
	vector<size_t>neibor_element_index_;
};